package com.teradata.multithread.cron;

import it.sauronsoftware.cron4j.ProcessTask;
import it.sauronsoftware.cron4j.Scheduler;

/**
 * @author: lyndon
 * @version: 1.0
 * @date: 2019/2/19
 */
public class ScheduleSysProgram {

    public static void main(String[] args) {
        /*ProcessTask task = new ProcessTask("C:\\Windows\\System32\\notepad.exe");
        Scheduler scheduler = new Scheduler();
        scheduler.schedule("* * * * *", task);
        scheduler.start();*/

        String[] command = { "C:\\Windows\\System32\\notepad.exe", "C:\\OnKeyDetector.log" };
        ProcessTask task = new ProcessTask(command);
        Scheduler scheduler = new Scheduler();
        scheduler.schedule("* * * * *", task);
        scheduler.start();
    }
}
